/**
 * Copyright &copy; 2012-2016 <a href="https://www.kaaction.com">KAA</a> All rights reserved All rights reserved.
 */
package com.kaaction.modules.crab.service;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.kaaction.common.persistence.Page;
import com.kaaction.common.service.CrudService;
import com.kaaction.modules.crab.entity.CrabProduct;
import com.kaaction.modules.crab.dao.CrabProductDao;

/**
 * 商品管理Service
 * @author huanghaiming
 * @version 2017-07-18
 */
@Service
@Transactional(readOnly = true)
public class CrabProductService extends CrudService<CrabProductDao, CrabProduct> {

	public CrabProduct get(String id) {
		return super.get(id);
	}
	
	public List<CrabProduct> findList(CrabProduct crabProduct) {
		return super.findList(crabProduct);
	}
	
	public Page<CrabProduct> findPage(Page<CrabProduct> page, CrabProduct crabProduct) {
		return super.findPage(page, crabProduct);
	}
	
	@Transactional(readOnly = false)
	public void save(CrabProduct crabProduct) {
		super.save(crabProduct);
	}
	
	@Transactional(readOnly = false)
	public void delete(CrabProduct crabProduct) {
		super.delete(crabProduct);
	}

	@Transactional(readOnly = false)
	public void updateIsShow(CrabProduct crabProduct) {
		super.dao.updateIsShow(crabProduct);
	}

	public List<CrabProduct> getProducts(String couponId) {
		return super.dao.getProducts(couponId);
	}

	public List<Map<String,Object>> selRecommendProduct() {
		return super.dao.selRecommendProduct();
	}
	
}